<link rel="stylesheet" href="/statics/css/category.css">
<div class="blog-list">
    <div class="header-choose">
        <ul class="clearfix">
            <?php foreach ($types as $le=>$that):?>
                <li  <?php if ($le==0):?>class="active" <?php endif;?> attr="display_<?=$that['id']?>"><?=$that['cate_name']?></li>
            <?php endforeach;?>
        </ul>
    </div>
    <?php foreach ($data as $key=>$item):?>
        <div class="tab-content" <?php if ($types[0]['id']==$key):?>style="display: block" <?php endif;?> id="display_<?=$key?>" total="<?=$item['total']?>">
            <?php if (count($item['rows'])):?>
                <?php foreach ($item['rows'] as $le=>$that):?>
                    <div class="item item-blog">
                            <aside>
                                <a href="<?=$that['url']?>" target="_blank">
                                    <img class="img-responsive" src="<?=$that['cover_image']?>" alt="image" onerror="this.src='/statics/images/245X138.jpg'">
                                </a>
                            </aside>
                            <div class="media-body">
                                <h3 class="title mb-1"><a href="<?=$that['url']?>" target="_blank"><?=$that['title']?></a></h3>
                                <div class="see clearfix">
                                    <div class="left mg-tag"> <?php if ($that['tags']!=''):?>
                                            <i class="fa fa-tags"></i>
                                            <?php foreach ($that['tags'] as $keys=>$els):?>
                                                <a href="<?=$els['tag_url']?>" target="_blank"><?=$els["text"]?></a>
                                            <?php endforeach;?>
                                        <?php endif;?>
                                        <span><i class="fa fa-calendar"></i><?=$that['release_at']?></span>
                                    </div>
                                    <div class="right">
                                        <!--<span class="comment"><a href="#">8 comments</a></span>-->
                                    </div>
                                </div>
                                <div class="intro"><?=$that['summary']?></div>
                            </div><!--//media-body-->
                    </div>
                <?php endforeach;?>
            <?php endif;?>
            <?php if ($item['total']>10):?>
                <p class="loadMore">  <a href="/category/<?=$key?>.html?page=2">查看更多</a></p>
            <?php endif;?>
        </div>
    <?php endforeach;?>
</div>
<?=$this->registerJs("
requirejs(['/statics/js/public/control.js?'+(new Date()).getTime()], function () {
        require(['category']);;
    });
",\yii\web\View::POS_END)?>
